<?php

session_start();

include_once "metier/connexion.php";

redirigerSiConnecte();

include_once "metier/XSRF.php";

include_once "haut.php";

?>

<div>
	<?php notifications(); ?>
	<fieldset>
		<legend>Inscription</legend>
		<form method="post" action="gestionInscription.php" onsubmit="javascript:return validerInscription();">
			<table>
				<tr>
					<td>
						<label for="courriel">Adresse courriel</label>
					</td>
					<td>
						<input type="text" name="courriel" id="courriel"/>
					</td>
				</tr>
				<tr>
					<td>
						<label for="mdp">Mot de passe</label>
					</td>
					<td>
						<input type="password" name="mdp" id="mdp"/>
					</td>
				</tr>
				<tr>
					<td>
						<label for="confirmation">Confirmation</label>
					</td>
					<td>
						<input type="password" name="confirmation" id="confirmation"/>
					</td>
				</tr>
				<tr>
					<td><img src="metier/captcha.php" id="captcha" /></td>
					<td><input type="text" name="captcha" id="captcha-form" autocomplete="off" /><br/>
					<!-- CHANGE TEXT LINK -->
					<a href="#" onclick="
						document.getElementById('captcha').src='metier/captcha.php?'+Math.random();
						document.getElementById('captcha-form').focus();"
						id="change-image">Pas lisible? Changer le texte.</a><br/><br/></td>
				</tr>
				<tr>
					<td><input id="submit" type="submit"/></td>
					<td><input id="reset" type="reset"/></td>
				</tr>
			</table>
			<input type="hidden" name="mdpchiffre" id="mdpchiffre"/>
			<input type="hidden" name="confirmationchiffre" id="confirmationchiffre"/>
			<input type="hidden" name="token" value="<?php echo genererToken("INSCRIPTION_SITE", 1); ?>"/>
		</form>
	</fieldset>
</div>

<?php
include_once "bas.php";
?>